package com.ll.studentservice.controller;


import com.ll.commonUtils.R;
import com.ll.studentservice.entity.EduKeTime;
import com.ll.studentservice.entity.vo.EduKeTimeVo;
import com.ll.studentservice.service.EduKeTimeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.junit.Test;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ll
 * @since 2020-11-27
 */
@Api(description = "课程时间获取API") //swagger界面提示
@RestController
@RequestMapping("/studentservice/eduketime")
public class EduKeTimeController {
    
    @Autowired
    private EduKeTimeService eduKeTimeService;

    @GetMapping("findTime")
    @ApiOperation(value = "获取每节课对应的时间") //swagger界面提示
    public R findTime(){
        EduKeTime eduKeTime = eduKeTimeService.getById(1);
        EduKeTimeVo eduKeTimeVo = new EduKeTimeVo();
        BeanUtils.copyProperties(eduKeTime, eduKeTimeVo);
        System.out.println(eduKeTimeVo);
        return R.ok().data("eduKeTime", eduKeTimeVo);
    }
}

